package com.example.iotmanagerment26.service.impl;

import com.example.iotmanagerment26.domain.Data;
import com.example.iotmanagerment26.mapper.DataMapper;
import com.example.iotmanagerment26.service.DataService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 作者：太难猫
 * 创建时间： 2025/6/4 16:11
 */
@Service
public class DataServiceImpl implements DataService {
    @Resource
    DataMapper dataMapper;

    @Override
    public int insertData(Data data) {
        return dataMapper.insertData(data);
    }

    @Override
    public Data selectDataByName(String name) {
        return dataMapper.selectDataByName(name);
    }

    @Override
    public List<Data> selectHisDataByName(String name) {
        return dataMapper.selectHisDataByName(name);
    }
}